package com.jinjie.config;

import com.jinjie.config.tomcat.ContextPathInterceptor;
import com.jinjie.config.tomcat.TomcatConfiguration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @program: com.jinjie.config
 * @Description:
 * @author: Administrator
 * @create: 2025-02-10 15:52
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Resource
    private ContextPathInterceptor contextPathInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(contextPathInterceptor).addPathPatterns("/**");

    }

}
